[GENERAL] Set operator. - Mailing list pgsql-general

From Stuart Rison
Subject [GENERAL] Set operator.
Date
Msg-id v04020a04b3b0c207de95@[128.40.242.190]
Whole thread Raw
Responses Re: [GENERAL] Set operator.
List pgsql-general
Dear all,

What set operators other then UNION do PG have?

In particular, I am interested in the MINUS or equivalent operator. e.g

table1:

value1
1
2
3
4
5
6
7
8
9

table2:

value2
1
3
5
7
9

SELECT table1.value1 FROM table1 MINUS table2.value2 FROM table2;

result:
2
4
6
8

I have PG 6.4.0 so please specify what version of PG might have this
functionality... also, can anybody offer hints as to how to implement such
functionality if necessary?

Regards,

Stuart.

+-------------------------+--------------------------------------+
| Stuart Rison            | Ludwig Institute for Cancer Research |
+-------------------------+ 91 Riding House Street               |
| Tel. (0171) 878 4041    | London, W1P 8BT, UNITED KINGDOM.     |
| Fax. (0171) 878 4040    | stuart@ludwig.ucl.ac.uk              |
+-------------------------+--------------------------------------+

pgsql-general by date:

Previous
From: Claudio R Zamana
Date:
Subject: subscribe pgsql-general
Next
From: "Nikolay Mijaylov"
Date:
Subject: Re: [GENERAL] Set operator.